home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
bbsutil
/
dlx70bbs.zip
/
DLX70SRC.ZIP
/
RNTABS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-19
|
1KB
|
74 lines
/*
RNTABS.C:
Make a generic tab-delimited table out of a DLX REALNAME file
This table can then be read by a spreadsheet or Works or what have you
DLX Bulletin Board System V7.0
FREEWARE NOTICE
DLX V7.0 is placed in the public domain by its author, Richard Gillmann.
Anyone who wishes to may run the program, copy it, or modify it for
any purpose, including commercial gain.
*/
#include <stdio.h>
#include <string.h>
FILE *fp;
char szLines[81];
char szFrom[81],szTo[81],szDate[81],szSubject[81];
char szNada[81];
char szName[81],szAddress[81],szCity[81],szPhone[81];
char szBig[400];
MyGets(char *sz)
{
fgets(sz,81,fp);
sz[strlen(sz)-1]='\0';
}
main()
{
int n,nFile,max,nLen;
if(!(fp = fopen("realname","r")))
return 1;
while (!feof(fp))
{
MyGets(szLines);
if (atoi(szLines)!=9) continue;
fscanf(fp,"From: ");
MyGets(szFrom);
nFile = atoi(strrchr(szFrom,' ')+1);
if (!nFile) continue;
*strrchr(szFrom,' ')='\0';
MyGets(szTo);
fscanf(fp,"Date: ");
MyGets(szDate);
*strrchr(szDate,' ')='\0';
fscanf(fp,"Subject: New Caller/");
MyGets(szSubject);
MyGets(szNada);
MyGets(szName);
MyGets(szAddress);
MyGets(szCity);
MyGets(szPhone);
printf("%s\t%d\t%s\t%s\t%s\t%s\t%s\t%s\tNEW\n",
szFrom,nFile,szDate,szName,szAddress,szCity,szPhone,szSubject);
}
fclose(fp);
return 0;
}